<?php
error_reporting(E_ALL);

if($argc < 2)
{
	echo "Usegae:\n\t";
	echo "php test.php site_id\n";
	exit;
}

chdir(dirname(__FILE__) . '/../../');
require_once 'bootstrap.php';

$config = Ezer_Config::createFromPath('config.xml');

Propel::setConfiguration($config->database->toArray());
Propel::initialize();

$siteId = $argv[1];
$site = SeoSitePeer::retrieveByPK($siteId);
if(!$site)
	die("Site [$siteId] not found");
	
$case = CaseManager::addCase($siteId);
if($case)
	echo "Case [" . $case->getId() . "] added";
else
	echo "Failed to add case";
